#include <iostream>
#include <vector>

using std::cout;
using std::endl;
using std::vector;

void test0()
{
    vector<int> vec;
    vec.reserve(10);
    cout << "size() = " << vec.size() << endl;
    cout << "capacity() = " << vec.capacity() << endl;

    cout << endl << "-----------" << endl;
    vec[0] = 1;//没有将元素放到容器中
    vec[1] = 2;//没有将元素放到容器中
    /* vec.push_back(1);//ok,可以将元素存放到容器中 */
    /* vec.push_back(2);//ok,可以将元素存放到容器中 */
    cout << "size() = " << vec.size() << endl;
    cout << "capacity() = " << vec.capacity() << endl;
    for(auto &elem : vec)
    {
        cout << elem << "  ";
    }
    cout << endl;
}

void test()
{
    vector<int> vec;
    /* vec[0] = 1; */
    /* vec.at(0) = 1; */
    cout << "1111" << endl;
}

int main(int argc, char *argv[])
{
    test();
    return 0;
}

